package com.maimang.platform.enums;

/**
 * platform框架的返回值状态码
 *
 * @author Rocky
 * @create 2019-01-10
 */
public enum Status {
	success(200, "成功"),
	token_valid(200, "token有效"),
	token_invalid(201, "token无效"),
	token_without(202, "无token，请重新登录"),
	userid_without(203, "无userid，请重新登录"),
	user_without(204, "无用户，请检查"),
	parameters_incorrect(400, "参数不正确"),
	parameters_invalid(401, "特定参数不符合条件(eg:没有这个用户)"),
	service_notfound(402, "没有这个服务"),
	node_unavailable(403, "没有可用的服务节点"),

	error(500, "失败"),
	authentication_fail(501, "认证失败"),
	roles_fail(502, "授权失败"),
	session_expiration(503, "Session 过期"),
	session_lose(504, "Session 丢失"),

	timeout(510, "调用超时"),
	generate_return_error(511, "处理返回值错误"),
	limit(512, "接口调用次数超过限制"),
	limit_by_group(513, "用户调用次数超过限制");

	public String message;
	public Integer code;

	Status(Integer code, String message) {
		this.message = message;
		this.code = code;
	}

}
